package com.ymttest.database.mapping.thirdpartysync;

import com.ymttest.database.model.thirdpartysync.promoter;
import com.ymttest.database.model.thirdpartysync.promoterExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface promoterMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoter
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @SelectProvider(type=promoterSqlProvider.class, method="countByExample")
    int countByExample(promoterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoter
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @DeleteProvider(type=promoterSqlProvider.class, method="deleteByExample")
    int deleteByExample(promoterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoter
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @Delete({
        "delete from promoter",
        "where Id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoter
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @Insert({
        "insert into promoter (Id, Name, ",
        "Status)",
        "values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, ",
        "#{status,jdbcType=INTEGER})"
    })
    int insert(promoter record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoter
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @InsertProvider(type=promoterSqlProvider.class, method="insertSelective")
    int insertSelective(promoter record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoter
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @SelectProvider(type=promoterSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="Id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="Name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="Status", property="status", jdbcType=JdbcType.INTEGER)
    })
    List<promoter> selectByExample(promoterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoter
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @Select({
        "select",
        "Id, Name, Status",
        "from promoter",
        "where Id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="Id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="Name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="Status", property="status", jdbcType=JdbcType.INTEGER)
    })
    promoter selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoter
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @UpdateProvider(type=promoterSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") promoter record, @Param("example") promoterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoter
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @UpdateProvider(type=promoterSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") promoter record, @Param("example") promoterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoter
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @UpdateProvider(type=promoterSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(promoter record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoter
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @Update({
        "update promoter",
        "set Name = #{name,jdbcType=VARCHAR},",
          "Status = #{status,jdbcType=INTEGER}",
        "where Id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(promoter record);
}